/*
 * @Author: your name
 * @Date: 2021-05-07 18:14:20
 * @LastEditTime: 2021-05-30 19:08:39
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue01d:\HTML001\布局小技巧\轮播图\轮播图.js0       
 */
const main = document.getElementsByClassName("box")[0]
const img = document.getElementsByClassName("img")

var min = 0
setInterval(function(){
    const a = min*-400
    main.style.left = a+"px"
    min++
    if(min>6){
        main.style.transition = "none"
        main.style.left = 0+"px"
        setTimeout(function(){
            main.style.transition = "1s"
        }, 500);
        min =1
    }
}, 1000);
